package com.kantboot.business.water.service;

import com.kantboot.business.water.domain.dto.BusWaterGoodsOrderSearchDTO;
import com.kantboot.business.water.domain.dto.BusWaterGoodsOrderSearchOfAdminDTO;
import com.kantboot.business.water.domain.dto.BusWaterGoodsOrderSearchOfManageDTO;
import com.kantboot.business.water.domain.dto.GoodsGenPayOrderDTO;
import com.kantboot.business.water.domain.entity.BusWaterGoodsOrder;
import com.kantboot.business.water.domain.vo.CountOfGoodsOrderVO;
import com.kantboot.business.water.domain.vo.OrderMoneyVO;
import com.kantboot.business.water.domain.vo.OrderUuidVO;
import com.kantboot.functional.pay.order.domian.entity.FunctionalPayOrder;
import com.kantboot.util.core.param.PageParam;
import com.kantboot.util.core.result.PageResult;

import java.math.BigDecimal;

public interface IBusWaterGoodsOrderService {

    /**
     * 根据vip的ID获取订单折扣价格
     */
    OrderMoneyVO getDiscountPriceByVipId(Long vipId, BigDecimal money);

    /**
     * 根据用户id获取订单折扣价格
     */
    OrderMoneyVO getDiscountPriceByUserId(Long userId,BigDecimal money);

    /**
     * 根据用户自身获取订单折扣价格
     */
    OrderMoneyVO getDiscountPriceBySelf(BigDecimal money);

    /**
     * 根据用户id和商品id获取订单折扣价格
     */
    OrderMoneyVO getDiscountPriceByUserIdAndGoodsId(Long userId, Long goodsId,Long goodsNumber);

    /**
     * 根据用户自身和商品id获取订单折扣价格
     */
    OrderMoneyVO getDiscountPriceBySelfAndGoodsIdAndGoodsNumber(Long goodsId,Long goodsNumber);

    /**
     * 生成订单号
     */
    FunctionalPayOrder generatePayOrder(GoodsGenPayOrderDTO dto);

    /**
     * 订单更新事件消费
     * @param orderId
     */
    void updateOrderPaySuccessEvent(String orderId);

    /**
     * 检查30分钟未支付订单做删除动作
     *
     */
    void checkUnPayOrderTask();

    /**
     * 将订单id改成未自提状态
     */
    void orderToNotProvided(Long orderId);

//    /**
//     * 根据订单提货
//     * @param orderCode
//     */
//    void pickGoods(Long orderCode);
//
//    String generatePickCode(Long orderId);
;

    /**
     * 获取自身订单数量
     */
    CountOfGoodsOrderVO getCountOfGoodsOrderSelf();

    PageResult getBodyData(PageParam<BusWaterGoodsOrderSearchOfAdminDTO> pageable);

    PageResult  getBodyDataFront(PageParam<BusWaterGoodsOrderSearchDTO> busWaterGoodsOrder);

    PageResult  getBodyDataFrontSelf(PageParam<BusWaterGoodsOrderSearchDTO> busWaterGoodsOrder);

    /**
     * 查看自己管辖的订单
     */
    PageResult getBodyDataFrontSelfManager(PageParam<BusWaterGoodsOrderSearchOfManageDTO> busWaterGoodsOrder);


    /**
     * 生成订单提货码
     */
    OrderUuidVO generatePickUuid(Long orderId);

    /**
     * 根据uuid核销
     */
    void pickGoodsByUuid(String uuid);


    /**
     * 根据uuid获取订单
     */
    OrderUuidVO getByUuid(String uuid);

    BusWaterGoodsOrder getByPayOrderId(Long payOrderId);


}
